<?php
/* @var $this HelpController */
/* @var $model Help */

$this->breadcrumbs=array(
	'帮助中心'=>array('/manage/help/admin'),
	'内容管理dd'=>array('/manage/help/admin'),
);
?>

<div class="pro_filter c_f">
	<div class="filter f_l">
		<?php $form=$this->beginWidget('CActiveForm', array(
			'action'=>Yii::app()->createUrl($this->route),
			'method'=>'get',
		)); ?>
			<label class="">选择类目：</label>
			<span class="cont" id="catagory">
				<select name="cateid1" class="level_1 s_ipt w_120" id="dataProductIndustryId1" ></select>
				<select name="cateid2" class="level_2 s_ipt w_120  id="dataProductIndustryId2"></select>
			</span>
			<label class="">标题：</label>
			<?php echo $form->textField($model,'zhe_title',array('class'=>'t_ipt w_120'))?>
			<label class="">内容：</label> 
			<?php echo $form->textField($model,"zhe_content",array('class'=>'t_ipt w_170'))?>
			<button class="mem_bgx mem_btn01" type="submit" name="">查找</button>
		<?php $this->endWidget(); ?>
	</div>
</div>

<table class="list_table list_table2" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<th width="" class="pl15">内容标题</th>
		<th width="26%">内容分类</th>
		<th width="15%">发布时间</th> 
		<th width="12%">操作</th>                                                    
	</tr>
</table>

<?php   
$this->widget('zii.widgets.CListView', array(  
    'dataProvider'=>$model->search(),  
    'itemView'=>'_view',    
    'emptyText'=>'暂时没有数据',  
    'selectAll'=>array('ids[]','id[]'),  
	'itemsTagName'=>'table',
	'itemsOptions'=>array('class'=>'list_table list_table2','width'=>'100%','cellpadding'=>0,'cellspacing'=>0),
    'artLink'=>array(  
		//批量删除
		array(Yii::t('adm','Delete All'),'/manage/help/delete','确认批量删除选中项目！'),
    ),  
    'batchItem'=>array(  
        //移动到分类  
     //   $add_drop,  
        //添加到分类  
      //  $remove_drop,  
    ),  
    ));  
?> 
<script type="text/javascript" src="/js/multi_select.js"></script>
<script type="text/javascript">
$.getJSON('/cache/getHelpCat',function(json){
	var options	= {data	: json};
	var loc = new multi_select(options);
	loc.bind('#catagory .level_1','<?php if(!empty($model->helpcat)) echo ($model->helpcat->zhc_parentid==0)?$model->helpcat->zhc_id:(($model->helpcat->zhc_topid==0)?$model->helpcat->zhc_parentid:$model->helpcat->zhc_topid)?>');
	loc.bind('#catagory .level_2','<?php if(!empty($model->helpcat)) echo ($model->helpcat->zhc_parentid==0)?'':(($model->helpcat->zhc_topid==0)?$model->helpcat->zhc_id:$model->helpcat->zhc_parentid)?>');
});
</script>
